package com.sunlei.controller;

import com.sunlei.service.Impl.StudentServiceImpl;
import com.sunlei.service.StudentService;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @author sunlei
 */
@Controller
public class StudentController {
    static Logger logger = Logger.getLogger(StudentController.class);
    @Resource
    private StudentServiceImpl studentService;
    @RequestMapping("/query")
    @ResponseBody
    public String queryStudent(){

        System.out.println(studentService.queryStudent());
        logger.info("info log4j");
        logger.debug("debug log4j");
        logger.error("error log4j");
        return "ok";
    }
}
